package com.javachamp.arithmetic;

public class BinaryOps {

	public static void main(String[] args) {
		int i = 257;
		System.out.println(Integer.toBinaryString(i));
		
		byte b1, b2, b3, b4;
		b1 = (byte) i;
		System.out.println(b1);
		b2 = (byte) (i>>8);
		System.out.println(b2);
		b3 = (byte) (i>>16);
		System.out.println(b3);
		b4 = (byte) (i>>24);
		System.out.println(b4);
		
//		System.out.println(Integer.toBinaryString(i));
//		System.out.println(Integer.toBinaryString(i<<8));
//		System.out.println(Integer.toBinaryString(i<<16));
//		System.out.println(Integer.toBinaryString(i<<24));
//		System.out.println(Integer.toBinaryString(i<<32));
//		System.out.println("****************************");
//		System.out.println(Integer.toBinaryString(i));
//		System.out.println(Integer.toBinaryString(i>>8));
//		System.out.println(Integer.toBinaryString(i>>16));
//		System.out.println(Integer.toBinaryString(i>>24));
//		System.out.println(Integer.toBinaryString(i>>32));

		//		System.out.println(i >> 8);
//		System.out.println(i >> 16);
//		System.out.println(i >> 24);
//		System.out.println(i >> 32);
	}
	
}
